/**
 * Bakalarska prace - Inteligentni budik
 * @package sleepCatcher
 * @file FormAlarmName.h
 * @author Jan Pesava - xpesav00
 * @email xpesav00@stud.fit.vutbr.cz
 * @date 24. 12. 2011
 */

#ifndef FORMALARMNAME_H_
#define FORMALARMNAME_H_

#include "models/SCAlarm.h"
#include "SCFormManager.h"

#include <FBase.h>
#include <FUi.h>

using namespace Osp::Base;
using namespace Osp::Ui::Controls;


class FormAlarmName  :
	public Osp::Ui::Controls::Form,
	public Osp::Ui::IActionEventListener
{

// Construction
public:
	FormAlarmName();
	virtual ~FormAlarmName();

// Constants
	static const int IDA_ALARM_CONFIRM 	= 200;
	static const int IDA_ALARM_CANCEL	= 201;
// Attributes
	EditField* pAlarmName;
	SCAlarm* pAlarm;
// Methods
public:
	bool Initialize(void);
	virtual result OnInitializing(void);
	virtual result OnTerminating(void);
	virtual void OnActionPerformed(const Osp::Ui::Control& source, int actionId);
	int GetFormId();
	void SetAlarm(SCAlarm* pAlarm);
	SCAlarm* GetAlarm();
	void Update();
	void Redraw();
};

#endif /* FORMALARMNAME_H_ */
